<!doctype html><html lang="en">
 <head>
  <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  <title>CSS Mobile Text Size Adjustment Module Level 1</title>
  <meta content="width=device-width, initial-scale=1, shrink-to-fit=no" name="viewport">
  <meta content="revising" name="csswg-work-status">
  <meta content="ED" name="w3c-status">
  <meta content="This module contains features of CSS relating to one possible mechanism for adapting pages designed for desktop computer displays for display on smaller screens such as those of mobile phones.  This mechanism involves displaying a scaled down display of the Web page and allowing the user to pan and zoom within that display, but within that scaled down display making certain text and similar elements larger than specified by the page author in order to ensure that when a block of wrapped text is zoomed to the width of the device (so it can be read without side-to-side scrolling for each line), the text is large enough to be readable." name="abstract">
  <link href="../default.css" rel="stylesheet" type="text/css">
  <link href="../csslogo.ico" rel="shortcut icon" type="image/x-icon">
<style>
  body {
    background: url("https://www.w3.org/StyleSheets/TR/logo-ED") top left no-repeat;
  }
  </style>
  <link href="https://www.w3.org/TR/css-size-adjust/" rel="canonical">
<style>/* style-md-lists */

/* This is a weird hack for me not yet following the commonmark spec
   regarding paragraph and lists. */
[data-md] > :first-child {
    margin-top: 0;
}
[data-md] > :last-child {
    margin-bottom: 0;
}</style>
<style>/* style-counters */

body {
    counter-reset: example figure issue;
}
.issue {
    counter-increment: issue;
}
.issue:not(.no-marker)::before {
    content: "Issue " counter(issue);
}

.example {
    counter-increment: example;
}
.example:not(.no-marker)::before {
    content: "Example " counter(example);
}
.invalid.example:not(.no-marker)::before,
.illegal.example:not(.no-marker)::before {
    content: "Invalid Example" counter(example);
}

figcaption {
    counter-increment: figure;
}
figcaption:not(.no-marker)::before {
    content: "Figure " counter(figure) " ";
}</style>
<style>/* style-dfn-panel */

.dfn-panel {
    position: absolute;
    z-index: 35;
    height: auto;
    width: -webkit-fit-content;
    width: fit-content;
    max-width: 300px;
    max-height: 500px;
    overflow: auto;
    padding: 0.5em 0.75em;
    font: small Helvetica Neue, sans-serif, Droid Sans Fallback;
    background: #DDDDDD;
    color: black;
    border: outset 0.2em;
}
.dfn-panel:not(.on) { display: none; }
.dfn-panel * { margin: 0; padding: 0; text-indent: 0; }
.dfn-panel > b { display: block; }
.dfn-panel a { color: black; }
.dfn-panel a:not(:hover) { text-decoration: none !important; border-bottom: none !important; }
.dfn-panel > b + b { margin-top: 0.25em; }
.dfn-panel ul { padding: 0; }
.dfn-panel li { list-style: inside; }
.dfn-panel.activated {
    display: inline-block;
    position: fixed;
    left: .5em;
    bottom: 2em;
    margin: 0 auto;
    max-width: calc(100vw - 1.5em - .4em - .5em);
    max-height: 30vh;
}

.dfn-paneled { cursor: pointer; }
</style>
<style>/* style-selflinks */

.heading, .issue, .note, .example, li, dt {
    position: relative;
}
a.self-link {
    position: absolute;
    top: 0;
    left: calc(-1 * (3.5rem - 26px));
    width: calc(3.5rem - 26px);
    height: 2em;
    text-align: center;
    border: none;
    transition: opacity .2s;
    opacity: .5;
}
a.self-link:hover {
    opacity: 1;
}
.heading > a.self-link {
    font-size: 83%;
}
li > a.self-link {
    left: calc(-1 * (3.5rem - 26px) - 2em);
}
dfn > a.self-link {
    top: auto;
    left: auto;
    opacity: 0;
    width: 1.5em;
    height: 1.5em;
    background: gray;
    color: white;
    font-style: normal;
    transition: opacity .2s, background-color .2s, color .2s;
}
dfn:hover > a.self-link {
    opacity: 1;
}
dfn > a.self-link:hover {
    color: black;
}

a.self-link::before            { content: "¶"; }
.heading > a.self-link::before { content: "§"; }
dfn > a.self-link::before      { content: "#"; }</style>
<style>/* style-autolinks */

.css.css, .property.property, .descriptor.descriptor {
    color: #005a9c;
    font-size: inherit;
    font-family: inherit;
}
.css::before, .property::before, .descriptor::before {
    content: "‘";
}
.css::after, .property::after, .descriptor::after {
    content: "’";
}
.property, .descriptor {
    /* Don't wrap property and descriptor names */
    white-space: nowrap;
}
.type { /* CSS value <type> */
    font-style: italic;
}
pre .property::before, pre .property::after {
    content: "";
}
[data-link-type="property"]::before,
[data-link-type="propdesc"]::before,
[data-link-type="descriptor"]::before,
[data-link-type="value"]::before,
[data-link-type="function"]::before,
[data-link-type="at-rule"]::before,
[data-link-type="selector"]::before,
[data-link-type="maybe"]::before {
    content: "‘";
}
[data-link-type="property"]::after,
[data-link-type="propdesc"]::after,
[data-link-type="descriptor"]::after,
[data-link-type="value"]::after,
[data-link-type="function"]::after,
[data-link-type="at-rule"]::after,
[data-link-type="selector"]::after,
[data-link-type="maybe"]::after {
    content: "’";
}

[data-link-type].production::before,
[data-link-type].production::after,
.prod [data-link-type]::before,
.prod [data-link-type]::after {
    content: "";
}

[data-link-type=element],
[data-link-type=element-attr] {
    font-family: Menlo, Consolas, "DejaVu Sans Mono", monospace;
    font-size: .9em;
}
[data-link-type=element]::before { content: "<" }
[data-link-type=element]::after  { content: ">" }

[data-link-type=biblio] {
    white-space: pre;
}</style>
 <body class="h-entry">
  <div class="head">
   <p data-fill-with="logo"><a class="logo" href="https://www.w3.org/"> <img alt="W3C" height="48" src="https://www.w3.org/StyleSheets/TR/2016/logos/W3C" width="72"> </a> </p>
   <h1 class="p-name no-ref" id="title">CSS Mobile Text Size Adjustment Module Level 1</h1>
   <h2 class="no-num no-toc no-ref heading settled" id="subtitle"><span class="content">Editor’s Draft, <time class="dt-updated" datetime="1970-01-01">1 January 1970</time></span></h2>
   <details>
    <summary>Specification Metadata</summary>
    <div data-fill-with="spec-metadata">
     <dl>
      <dt>This version:
      <dd><a class="u-url" href="https://drafts.csswg.org/css-size-adjust/">https://drafts.csswg.org/css-size-adjust/</a>
      <dt>Latest published version:
      <dd><a href="https://www.w3.org/TR/css-size-adjust/">https://www.w3.org/TR/css-size-adjust/</a>
      <dt class="editor">Editors:
      <dd class="editor p-author h-card vcard" data-editor-id="15393"><a class="p-name fn u-url url" href="https://dbaron.org/">L. David Baron</a> (<a class="p-org org" href="https://www.mozilla.org/">Mozilla</a>)
      <dd class="editor p-author h-card vcard" data-editor-id="1464"><a class="p-name fn u-url url" href="http://tantek.com/">Tantek Çelik</a> (<a class="p-org org" href="https://www.mozilla.org/">Mozilla</a>)
      <dt>Suggest an Edit for this Spec:
      <dd><a href="https://github.com/w3c/csswg-drafts/blob/master/css-size-adjust-1/Overview.bs">GitHub Editor</a>
      <dt>Issue Tracking:
      <dd><a href="https://github.com/w3c/csswg-drafts/labels/css-size-adjust-1">GitHub Issues</a>
     </dl>
    </div>
   </details>
   <div data-fill-with="warning"></div>
   <p class="copyright" data-fill-with="copyright"><a href="https://www.w3.org/Consortium/Legal/ipr-notice#Copyright">Copyright</a> © 1970 <a href="https://www.w3.org/"><abbr title="World Wide Web Consortium">W3C</abbr></a><sup>®</sup> (<a href="https://www.csail.mit.edu/"><abbr title="Massachusetts Institute of Technology">MIT</abbr></a>, <a href="https://www.ercim.eu/"><abbr title="European Research Consortium for Informatics and Mathematics">ERCIM</abbr></a>, <a href="https://www.keio.ac.jp/">Keio</a>, <a href="https://ev.buaa.edu.cn/">Beihang</a>). W3C <a href="https://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer">liability</a>, <a href="https://www.w3.org/Consortium/Legal/ipr-notice#W3C_Trademarks">trademark</a> and <a href="https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document">permissive document license</a> rules apply. </p>
   <hr title="Separator for header">
  </div>
  <div class="p-summary" data-fill-with="abstract">
   <h2 class="no-num no-toc no-ref heading settled" id="abstract"><span class="content">Abstract</span></h2>
   <p>This module contains features of CSS relating to one possible mechanism for adapting pages designed for desktop computer displays for display on smaller screens such as those of mobile phones.  This mechanism involves displaying a scaled down display of the Web page and allowing the user to pan and zoom within that display, but within that scaled down display making certain text and similar elements larger than specified by the page author in order to ensure that when a block of wrapped text is zoomed to the width of the device (so it can be read without side-to-side scrolling for each line), the text is large enough to be readable.</p>
    <a href="https://www.w3.org/TR/CSS/">CSS</a> is a language for describing the rendering of structured documents
(such as HTML and XML)
on screen, on paper, etc. 
  </div>
  <h2 class="no-num no-toc no-ref heading settled" id="status"><span class="content">Status of this document</span></h2>
  <div data-fill-with="status">
   <p> This is a public copy of the editors’ draft.
	It is provided for discussion only and may change at any moment.
	Its publication here does not imply endorsement of its contents by W3C.
	Don’t cite this document other than as work in progress. </p>
   <p> <a href="https://github.com/w3c/csswg-drafts/issues">GitHub Issues</a> are preferred for discussion of this specification.
	When filing an issue, please put the text “css-size-adjust” in the title,
	preferably like this:
	“[css-size-adjust] <i data-lt>…summary of comment…</i>”.
	All issues and comments are <a href="https://lists.w3.org/Archives/Public/public-css-archive/">archived</a>,
	and there is also a <a href="https://lists.w3.org/Archives/Public/www-style/">historical archive</a>. </p>
   <p> This document was produced by the <a href="https://www.w3.org/Style/CSS/">CSS Working Group</a>. </p>
   <p> This document was produced by a group operating under
	the <a href="https://www.w3.org/Consortium/Patent-Policy/">W3C Patent Policy</a>.
	W3C maintains a <a href="https://www.w3.org/2004/01/pp-impl/32061/status" rel="disclosure">public list of any patent disclosures</a> made in connection with the deliverables of the group;
	that page also includes instructions for disclosing a patent.
	An individual who has actual knowledge of a patent which the individual believes contains <a href="https://www.w3.org/Consortium/Patent-Policy/#def-essential">Essential Claim(s)</a> must disclose the information in accordance with <a href="https://www.w3.org/Consortium/Patent-Policy/#sec-Disclosure">section 6 of the W3C Patent Policy</a>. </p>
   <p> This document is governed by the <a href="https://www.w3.org/2019/Process-20190301/" id="w3c_process_revision">1 March 2019 W3C Process Document</a>. </p>
   <p></p>
   <p>The following features are at risk:</p>
   <ul>
    <li>the reference to <a data-link-type="biblio" href="#biblio-css-text-4">[CSS-TEXT-4]</a>'s <a class="property" data-link-type="propdesc" href="https://drafts.csswg.org/css-text-4/#propdef-text-wrap" id="ref-for-propdef-text-wrap">text-wrap</a> property
   </ul>
  </div>
  <div data-fill-with="at-risk"></div>
  <nav data-fill-with="table-of-contents" id="toc">
   <h2 class="no-num no-toc no-ref" id="contents">Table of Contents</h2>
   <ol class="toc" role="directory">
    <li>
     <a href="#intro"><span class="secno">1</span> <span class="content">Introduction</span></a>
     <ol class="toc">
      <li><a href="#placement"><span class="secno">1.1</span> <span class="content">Module interactions</span></a>
      <li><a href="#values"><span class="secno">1.2</span> <span class="content">Values</span></a>
     </ol>
    <li>
     <a href="#default-adjustment"><span class="secno">2</span> <span class="content">Default size adjustment</span></a>
     <ol class="toc">
      <li><a href="#default-adjustment-types"><span class="secno">2.1</span> <span class="content">Types of boxes adjusted</span></a>
      <li><a href="#default-adjustment-conditions"><span class="secno">2.2</span> <span class="content">Conditions that suppress adjustment</span></a>
      <li><a href="#default-adjustment-calculation"><span class="secno">2.3</span> <span class="content">Calculation of default adjustment</span></a>
     </ol>
    <li><a href="#adjustment-control"><span class="secno">3</span> <span class="content">Size adjustment control: the <span class="property">text-size-adjust</span> property</span></a>
    <li><a href="#acknowledgments"><span class="secno">4</span> <span class="content">Acknowledgments</span></a>
    <li>
     <a href="#conformance"><span class="secno"></span> <span class="content"> Conformance</span></a>
     <ol class="toc">
      <li><a href="#document-conventions"><span class="secno"></span> <span class="content"> Document conventions</span></a>
      <li><a href="#conform-classes"><span class="secno"></span> <span class="content"> Conformance classes</span></a>
      <li>
       <a href="#conform-responsible"><span class="secno"></span> <span class="content"> Requirements for Responsible Implementation of CSS</span></a>
       <ol class="toc">
        <li><a href="#conform-partial"><span class="secno"></span> <span class="content"> Partial Implementations</span></a>
        <li><a href="#conform-future-proofing"><span class="secno"></span> <span class="content"> Implementations of Unstable and Proprietary Features</span></a>
        <li><a href="#conform-testing"><span class="secno"></span> <span class="content"> Implementations of CR-level Features</span></a>
       </ol>
     </ol>
    <li>
     <a href="#index"><span class="secno"></span> <span class="content">Index</span></a>
     <ol class="toc">
      <li><a href="#index-defined-here"><span class="secno"></span> <span class="content">Terms defined by this specification</span></a>
      <li><a href="#index-defined-elsewhere"><span class="secno"></span> <span class="content">Terms defined by reference</span></a>
     </ol>
    <li>
     <a href="#references"><span class="secno"></span> <span class="content">References</span></a>
     <ol class="toc">
      <li><a href="#normative"><span class="secno"></span> <span class="content">Normative References</span></a>
     </ol>
    <li><a href="#property-index"><span class="secno"></span> <span class="content">Property Index</span></a>
    <li><a href="#issues-index"><span class="secno"></span> <span class="content">Issues Index</span></a>
   </ol>
  </nav>
  <main>
   <h2 class="heading settled" data-level="1" id="intro"><span class="secno">1. </span><span class="content">Introduction</span><a class="self-link" href="#intro"></a></h2>
   <p>A common mechanism for displaying Web pages that were designed for
  large desktop displays on much smaller displays such as those of
  mobile phones involves allowing the user to pan and zoom around within
  a view of the Web page drawn as though it were drawn into the width of
  a typical desktop Web browser display.  The ability to pan and zoom
  the page lets the user both see an overview of the page and zoom in to
  specific parts to read or interact with them.</p>
   <p>One common problem with this type of interaction occurs when the
  user wants to read a large block of text.  It might be that a block of
  text within this desktop-formatted page might be laid out so that when
  the user zooms in so that the text is large enough to read, each line
  of text is wider than the display on the small device.  This means the
  user needs to scroll side to side to read <em>each line of text</em>,
  which is a serious inconvenience to the user.</p>
   <p>One way for software that displays Web pages or other CSS-formatted
  content on a mobile device is to make some of the text larger so that
  this problem does not occur.  The goal of this enlargement is to make
  the text big enough so that when the block it is in is scaled to the
  width of the display, the text is large enough to read.  At the same
  time, this needs to be done with minimal disruption to the overall
  design of the page.</p>
   <p>While implementations of CSS are not required to use this
  technique, this module describes how implementations of CSS that do
  use this technique must do so.
  In other words, while implementations of CSS are not required to
  implement this module, this module nonetheless places requirements on
  implementations of this module.</p>
   <p>This module describes how this size adjustment works and describes a
  new CSS property that authors of CSS can use to provide hints to the
  implementation about which text or other elements should or should not
  be enlarged.</p>
   <h3 class="heading settled" data-level="1.1" id="placement"><span class="secno">1.1. </span><span class="content">Module interactions</span><a class="self-link" href="#placement"></a></h3>
   <p>This module adds additional features that are not defined in <a data-link-type="biblio" href="#biblio-css21">[CSS21]</a>.  These features may lead to a different size being computed
  than would be computed when following <span>[CSS21]</span> alone.</p>
   <h3 class="heading settled" data-level="1.2" id="values"><span class="secno">1.2. </span><span class="content">Values</span><a class="self-link" href="#values"></a></h3>
   <p>This specification follows the <a href="https://www.w3.org/TR/CSS21/about.html#property-defs">CSS property definition conventions</a> from <a data-link-type="biblio" href="#biblio-css21">[CSS21]</a>.
  Value types not defined in this specification are defined in CSS Values &amp; Units <a data-link-type="biblio" href="#biblio-css-values-3">[CSS-VALUES-3]</a>.
  Other CSS modules may expand the definitions of these value types.</p>
   <p>In addition to the property-specific values listed in their definitions,
  all properties defined in this specification
  also accept the <a data-link-type="dfn" href="https://drafts.csswg.org/css-values-4/#css-wide-keywords" id="ref-for-css-wide-keywords">CSS-wide keywords</a> keywords as their property value.
  For readability they have not been repeated explicitly.</p>
   <h2 class="heading settled" data-level="2" id="default-adjustment"><span class="secno">2. </span><span class="content">Default size adjustment</span><a class="self-link" href="#default-adjustment"></a></h2>
   <p>This section defines the default size adjustment rules.  These rules
are then referenced by the definition of the <a class="property" data-link-type="propdesc" href="#propdef-text-size-adjust" id="ref-for-propdef-text-size-adjust">text-size-adjust</a> property
in the following section.</p>
   <p class="issue" id="issue-85cdb433"><a class="self-link" href="#issue-85cdb433"></a> All of the subsections of this section need significant
refinement:  additional detail, verification that the detail already
present is correct, etc.</p>
   <p class="issue" id="issue-641cec1d"><a class="self-link" href="#issue-641cec1d"></a> It’s not clear how much this section should define
precise behavior versus how much it should allow future room for
innovation and improvement.</p>
   <h3 class="heading settled" data-level="2.1" id="default-adjustment-types"><span class="secno">2.1. </span><span class="content">Types of boxes adjusted</span><a class="self-link" href="#default-adjustment-types"></a></h3>
   <p>The default size adjustment affects text and form controls, whether
those form controls contain text (e.g., text inputs, selects) or do not
(e.g., radio buttons, checkboxes).</p>
   <h3 class="heading settled" data-level="2.2" id="default-adjustment-conditions"><span class="secno">2.2. </span><span class="content">Conditions that suppress adjustment</span><a class="self-link" href="#default-adjustment-conditions"></a></h3>
   <p>A number of conditions suppress the default adjustment because these
conditions are associated with layouts for which the user experience
would be worsened by size adjustment rather than improved by it.  These
conditions are:</p>
   <ul>
    <li>when the total amount of text in the block formatting context (see <a data-link-type="biblio" href="#biblio-css21">[CSS21]</a>) (excluding text inside descendant block formatting
  contexts) is approximately smaller than the amount that would require
  wrapping to more than one or two lines within that context’s
  width,
    <li>when the objects to be adjusted are inside a block-level or <a class="css" data-link-type="propdesc" href="https://drafts.csswg.org/css-display-3/#propdef-display" id="ref-for-propdef-display">display: inline-block</a> element with a <a class="property" data-link-type="propdesc" href="https://drafts.csswg.org/css2/visudet.html#propdef-height" id="ref-for-propdef-height">height</a> other than <a class="css" data-link-type="maybe" href="https://drafts.csswg.org/css-sizing-3/#valdef-width-auto" id="ref-for-valdef-width-auto">auto</a> (see <a data-link-type="biblio" href="#biblio-css21">[CSS21]</a>),
    <li>when the objects to be adjusted are inside a <a class="css" data-link-type="propdesc" href="https://drafts.csswg.org/css-display-3/#propdef-display" id="ref-for-propdef-display①">display: inline-block</a> element
  with a <a class="property" data-link-type="propdesc" href="https://drafts.csswg.org/css2/visudet.html#propdef-width" id="ref-for-propdef-width">width</a> other than <a class="css" data-link-type="maybe" href="https://drafts.csswg.org/css-sizing-3/#valdef-width-auto" id="ref-for-valdef-width-auto①">auto</a> (see <a data-link-type="biblio" href="#biblio-css21">[CSS21]</a>),
    <li>when the objects to be adjusted have <a class="property" data-link-type="propdesc" href="https://drafts.csswg.org/css-text-4/#propdef-white-space" id="ref-for-propdef-white-space">white-space</a> of <a class="css" data-link-type="maybe" href="https://drafts.csswg.org/css-text-3/#valdef-white-space-pre" id="ref-for-valdef-white-space-pre">pre</a> or <a class="css" data-link-type="maybe" href="https://drafts.csswg.org/css-text-3/#valdef-white-space-nowrap" id="ref-for-valdef-white-space-nowrap">nowrap</a> (see <a data-link-type="biblio" href="#biblio-css21">[CSS21]</a>) or a <a class="property" data-link-type="propdesc" href="https://drafts.csswg.org/css-text-4/#propdef-text-wrap" id="ref-for-propdef-text-wrap①">text-wrap</a> of <a class="css" data-link-type="maybe" href="https://drafts.csswg.org/css-text-4/#valdef-text-wrap-nowrap" id="ref-for-valdef-text-wrap-nowrap">nowrap</a> (see <a data-link-type="biblio" href="#biblio-css-text-4">[CSS-TEXT-4]</a>).
   </ul>
   <h3 class="heading settled" data-level="2.3" id="default-adjustment-calculation"><span class="secno">2.3. </span><span class="content">Calculation of default adjustment</span><a class="self-link" href="#default-adjustment-calculation"></a></h3>
   <p>The adjustment performed should be based on preferences (of the
renderer or the renderer’s user) indicating the desired <dfn data-dfn-type="dfn" data-lt="minimum readable text size" data-noexport id="minimum-readable-text-size">minimum
readable text size<a class="self-link" href="#minimum-readable-text-size"></a></dfn>.
Given this preference, for each containing block of text to be adjusted,
there is a <dfn data-dfn-type="dfn" data-noexport id="minimum-block-text-size">minimum block text size<a class="self-link" href="#minimum-block-text-size"></a></dfn>:  the preference for the
minimum readable text size, times the width of the containing block,
divided by the width of the device.</p>
   <p>The size adjustment involves multiplication of sizes by a ratio
determined by the minimum block text size and the computed value of <a class="property" data-link-type="propdesc" href="https://drafts.csswg.org/css-fonts-3/#propdef-font-size" id="ref-for-propdef-font-size">font-size</a>.  This ratio must be at least the first divided by the
second; however, in order to maintain differentiations between font
sizes, it should often be slightly larger. <span class="issue" id="issue-7a854497"><a class="self-link" href="#issue-7a854497"></a>Define
this with more detail/precision.</span></p>
   <h2 class="heading settled" data-level="3" id="adjustment-control"><span class="secno">3. </span><span class="content">Size adjustment control: the <a class="property" data-link-type="propdesc" href="#propdef-text-size-adjust" id="ref-for-propdef-text-size-adjust①">text-size-adjust</a> property</span><a class="self-link" href="#adjustment-control"></a></h2>
   <table class="def propdef" data-link-for-hint="text-size-adjust">
    <tbody>
     <tr>
      <th>Name:
      <td><dfn class="dfn-paneled css" data-dfn-type="property" data-export id="propdef-text-size-adjust">text-size-adjust</dfn>
     <tr class="value">
      <th><a href="https://drafts.csswg.org/css-values/#value-defs">Value:</a>
      <td class="prod">auto <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one">|</a> none <span id="ref-for-comb-one①">|</span> <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-values-3/#percentage-value" id="ref-for-percentage-value">&lt;percentage></a> 
     <tr>
      <th><a href="https://drafts.csswg.org/css-cascade/#initial-values">Initial:</a>
      <td>auto 
     <tr>
      <th>Applies to:
      <td><a href="https://drafts.csswg.org/css-pseudo/#generated-content" title="Includes ::before and ::after pseudo-elements.">all elements</a> 
     <tr>
      <th><a href="https://drafts.csswg.org/css-cascade/#inherited-property">Inherited:</a>
      <td>yes 
     <tr>
      <th><a href="https://drafts.csswg.org/css-values/#percentages">Percentages:</a>
      <td>see below 
     <tr>
      <th><a href="https://drafts.csswg.org/css-cascade/#computed">Computed value:</a>
      <td>specfied keyword or percentage 
     <tr>
      <th>Canonical order:
      <td>N/A 
     <tr>
      <th><a href="https://drafts.csswg.org/web-animations/#animation-type">Animation type:</a>
      <td>by computed value 
   </table>
   <dl>
    <dt><dfn class="css" data-dfn-for="text-size-adjust" data-dfn-type="value" data-export id="valdef-text-size-adjust-auto">auto<a class="self-link" href="#valdef-text-size-adjust-auto"></a></dfn>
    <dd>Renderers must use the <a href="#default-adjustment">default size adjustment</a> when displaying on a small device.
    <dt><dfn class="css" data-dfn-for="text-size-adjust" data-dfn-type="value" data-export id="valdef-text-size-adjust-none">none<a class="self-link" href="#valdef-text-size-adjust-none"></a></dfn>
    <dd>Renderers must not do size adjustment when displaying on a small device.
    <dt><dfn class="css" data-dfn-for="text-size-adjust" data-dfn-type="value" data-export id="valdef-text-size-adjust-percentage">&lt;percentage><a class="self-link" href="#valdef-text-size-adjust-percentage"></a></dfn>
    <dd>
     When displaying on a small device, renderers must not do size adjustment but instead the computed value of <a class="property" data-link-type="propdesc" href="https://drafts.csswg.org/css-fonts-3/#propdef-font-size" id="ref-for-propdef-font-size①">font-size</a> must be multiplied by this percentage. 
     <p class="note" role="note">Note: This means that 'text-size-adjust: 100%;' is equivalent to 'text-size-adjust: none;'.</p>
     <p>Negative values are invalid. </p>
   </dl>
   <p class="issue" id="issue-a75ce4d0"><a class="self-link" href="#issue-a75ce4d0"></a> "Small device" is not well defined. We should clearly specify
  when text size adjustment should apply. For example, in practice a
  large tablet is considered by vendors to be a small device.</p>
   <h2 class="heading settled" data-level="4" id="acknowledgments"><span class="secno">4. </span><span class="content">Acknowledgments</span><a class="self-link" href="#acknowledgments"></a></h2>
   <p>The editors would like to thank:
  .</p>
  </main>
  <h2 class="no-ref no-num heading settled" id="conformance"><span class="content"> Conformance</span><a class="self-link" href="#conformance"></a></h2>
  <h3 class="heading settled" id="document-conventions"><span class="content"> Document conventions</span><a class="self-link" href="#document-conventions"></a></h3>
  <p>Conformance requirements are expressed with a combination of
	descriptive assertions and RFC 2119 terminology. The key words “MUST”,
	“MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”,
	“RECOMMENDED”, “MAY”, and “OPTIONAL” in the normative parts of this
	document are to be interpreted as described in RFC 2119.
	However, for readability, these words do not appear in all uppercase
	letters in this specification. </p>
  <p>All of the text of this specification is normative except sections
	explicitly marked as non-normative, examples, and notes. <a data-link-type="biblio" href="#biblio-rfc2119">[RFC2119]</a> </p>
  <p>Examples in this specification are introduced with the words “for example”
	or are set apart from the normative text with <code>class="example"</code>,
	like this: </p>
  <div class="example" id="example-ae2b6bc0">
   <a class="self-link" href="#example-ae2b6bc0"></a> 
   <p>This is an example of an informative example. </p>
  </div>
  <p>Informative notes begin with the word “Note” and are set apart from the
	normative text with <code>class="note"</code>, like this: </p>
  <p class="note" role="note">Note, this is an informative note. </p>
  <p>Advisements are normative sections styled to evoke special attention and are
	set apart from other normative text with <code>&lt;strong class="advisement"></code>, like
	this: <strong class="advisement"> UAs MUST provide an accessible alternative. </strong> </p>
  <h3 class="heading settled" id="conform-classes"><span class="content"> Conformance classes</span><a class="self-link" href="#conform-classes"></a></h3>
  <p>Conformance to this specification
	is defined for three conformance classes: </p>
  <dl>
   <dt>style sheet 
   <dd>A <a href="http://www.w3.org/TR/CSS2/conform.html#style-sheet">CSS
			style sheet</a>. 
   <dt>renderer 
   <dd>A <a href="http://www.w3.org/TR/CSS2/conform.html#user-agent">UA</a> that interprets the semantics of a style sheet and renders
			documents that use them. 
   <dt>authoring tool 
   <dd>A <a href="http://www.w3.org/TR/CSS2/conform.html#user-agent">UA</a> that writes a style sheet. 
  </dl>
  <p>A style sheet is conformant to this specification
	if all of its statements that use syntax defined in this module are valid
	according to the generic CSS grammar and the individual grammars of each
	feature defined in this module. </p>
  <p>A renderer is conformant to this specification
	if, in addition to interpreting the style sheet as defined by the
	appropriate specifications, it supports all the features defined
	by this specification by parsing them correctly
	and rendering the document accordingly. However, the inability of a
	UA to correctly render a document due to limitations of the device
	does not make the UA non-conformant. (For example, a UA is not
	required to render color on a monochrome monitor.) </p>
  <p>An authoring tool is conformant to this specification
	if it writes style sheets that are syntactically correct according to the
	generic CSS grammar and the individual grammars of each feature in
	this module, and meet all other conformance requirements of style sheets
	as described in this module. </p>
  <h3 class="heading settled" id="conform-responsible"><span class="content"> Requirements for Responsible Implementation of CSS</span><a class="self-link" href="#conform-responsible"></a></h3>
  <p>The following sections define several conformance requirements
		for implementing CSS responsibly,
		in a way that promotes interoperability in the present and future. </p>
  <h4 class="heading settled" id="conform-partial"><span class="content"> Partial Implementations</span><a class="self-link" href="#conform-partial"></a></h4>
  <p>So that authors can exploit the forward-compatible parsing rules to assign fallback values, <strong>CSS renderers <em>must</em> treat as invalid
		(and <a href="http://www.w3.org/TR/CSS2/conform.html#ignore">ignore as appropriate</a>)
		any at-rules, properties, property values, keywords, and other syntactic constructs
		for which they have no usable level of support</strong>.
		In particular, user agents <em>must not</em> selectively ignore
		unsupported property values and honor supported values in a single multi-value property declaration:
		if any value is considered invalid (as unsupported values must be),
		CSS requires that the entire declaration be ignored. </p>
  <h4 class="heading settled" id="conform-future-proofing"><span class="content"> Implementations of Unstable and Proprietary Features</span><a class="self-link" href="#conform-future-proofing"></a></h4>
  <p>To avoid clashes with future stable CSS features,
		the CSSWG recommends <a href="http://www.w3.org/TR/CSS/#future-proofing">following best practices</a> for the implementation of <a href="http://www.w3.org/TR/CSS/#unstable">unstable</a> features and <a href="http://www.w3.org/TR/CSS/#proprietary-extension">proprietary extensions</a> to CSS. </p>
  <h4 class="heading settled" id="conform-testing"><span class="content"> Implementations of CR-level Features</span><a class="self-link" href="#conform-testing"></a></h4>
  <p>Once a specification reaches the Candidate Recommendation stage,
		implementers should release an <a data-link-type="dfn" href="http://www.w3.org/TR/CSS/#vendor-prefix">unprefixed</a> implementation
		of any CR-level feature they can demonstrate
		to be correctly implemented according to spec,
		and should avoid exposing a prefixed variant of that feature. </p>
  <p>To establish and maintain the interoperability of CSS across
		implementations, the CSS Working Group requests that non-experimental
		CSS renderers submit an implementation report (and, if necessary, the
		testcases used for that implementation report) to the W3C before
		releasing an unprefixed implementation of any CSS features. Testcases
		submitted to W3C are subject to review and correction by the CSS
		Working Group. </p>
  <p>
   Further information on submitting testcases and implementation reports
		can be found from on the CSS Working Group’s website at <a href="http://www.w3.org/Style/CSS/Test/">http://www.w3.org/Style/CSS/Test/</a>.
		Questions should be directed to the <a href="http://lists.w3.org/Archives/Public/public-css-testsuite">public-css-testsuite@w3.org</a> mailing list. 
<script src="https://www.w3.org/scripts/TR/2016/fixup.js"></script>
  </p>
  <h2 class="no-num no-ref heading settled" id="index"><span class="content">Index</span><a class="self-link" href="#index"></a></h2>
  <h3 class="no-num no-ref heading settled" id="index-defined-here"><span class="content">Terms defined by this specification</span><a class="self-link" href="#index-defined-here"></a></h3>
  <ul class="index">
   <li><a href="#valdef-text-size-adjust-auto">auto</a><span>, in §3</span>
   <li><a href="#minimum-block-text-size">minimum block text size</a><span>, in §2.3</span>
   <li><a href="#minimum-readable-text-size">minimum readable text size</a><span>, in §2.3</span>
   <li><a href="#valdef-text-size-adjust-none">none</a><span>, in §3</span>
   <li><a href="#valdef-text-size-adjust-percentage">&lt;percentage></a><span>, in §3</span>
   <li><a href="#propdef-text-size-adjust">text-size-adjust</a><span>, in §3</span>
  </ul>
  <aside class="dfn-panel" data-for="term-for-propdef-display">
   <a href="https://drafts.csswg.org/css-display-3/#propdef-display">https://drafts.csswg.org/css-display-3/#propdef-display</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-propdef-display">2.2. Conditions that suppress adjustment</a> <a href="#ref-for-propdef-display①">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-propdef-font-size">
   <a href="https://drafts.csswg.org/css-fonts-3/#propdef-font-size">https://drafts.csswg.org/css-fonts-3/#propdef-font-size</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-propdef-font-size">2.3. Calculation of default adjustment</a>
    <li><a href="#ref-for-propdef-font-size①">3. Size adjustment control: the text-size-adjust property</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-valdef-width-auto">
   <a href="https://drafts.csswg.org/css-sizing-3/#valdef-width-auto">https://drafts.csswg.org/css-sizing-3/#valdef-width-auto</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-valdef-width-auto">2.2. Conditions that suppress adjustment</a> <a href="#ref-for-valdef-width-auto①">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-valdef-white-space-nowrap">
   <a href="https://drafts.csswg.org/css-text-3/#valdef-white-space-nowrap">https://drafts.csswg.org/css-text-3/#valdef-white-space-nowrap</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-valdef-white-space-nowrap">2.2. Conditions that suppress adjustment</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-valdef-white-space-pre">
   <a href="https://drafts.csswg.org/css-text-3/#valdef-white-space-pre">https://drafts.csswg.org/css-text-3/#valdef-white-space-pre</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-valdef-white-space-pre">2.2. Conditions that suppress adjustment</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-valdef-text-wrap-nowrap">
   <a href="https://drafts.csswg.org/css-text-4/#valdef-text-wrap-nowrap">https://drafts.csswg.org/css-text-4/#valdef-text-wrap-nowrap</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-valdef-text-wrap-nowrap">2.2. Conditions that suppress adjustment</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-propdef-text-wrap">
   <a href="https://drafts.csswg.org/css-text-4/#propdef-text-wrap">https://drafts.csswg.org/css-text-4/#propdef-text-wrap</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-propdef-text-wrap①">2.2. Conditions that suppress adjustment</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-propdef-white-space">
   <a href="https://drafts.csswg.org/css-text-4/#propdef-white-space">https://drafts.csswg.org/css-text-4/#propdef-white-space</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-propdef-white-space">2.2. Conditions that suppress adjustment</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-percentage-value">
   <a href="https://drafts.csswg.org/css-values-3/#percentage-value">https://drafts.csswg.org/css-values-3/#percentage-value</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-percentage-value">3. Size adjustment control: the text-size-adjust property</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-css-wide-keywords">
   <a href="https://drafts.csswg.org/css-values-4/#css-wide-keywords">https://drafts.csswg.org/css-values-4/#css-wide-keywords</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-css-wide-keywords">1.2. Values</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-comb-one">
   <a href="https://drafts.csswg.org/css-values-4/#comb-one">https://drafts.csswg.org/css-values-4/#comb-one</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-comb-one">3. Size adjustment control: the text-size-adjust property</a> <a href="#ref-for-comb-one①">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-propdef-height">
   <a href="https://drafts.csswg.org/css2/visudet.html#propdef-height">https://drafts.csswg.org/css2/visudet.html#propdef-height</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-propdef-height">2.2. Conditions that suppress adjustment</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-propdef-width">
   <a href="https://drafts.csswg.org/css2/visudet.html#propdef-width">https://drafts.csswg.org/css2/visudet.html#propdef-width</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-propdef-width">2.2. Conditions that suppress adjustment</a>
   </ul>
  </aside>
  <h3 class="no-num no-ref heading settled" id="index-defined-elsewhere"><span class="content">Terms defined by reference</span><a class="self-link" href="#index-defined-elsewhere"></a></h3>
  <ul class="index">
   <li>
    <a data-link-type="biblio">[css-display-3]</a> defines the following terms:
    <ul>
     <li><span class="dfn-paneled" id="term-for-propdef-display" style="color:initial">display</span>
    </ul>
   <li>
    <a data-link-type="biblio">[css-fonts-3]</a> defines the following terms:
    <ul>
     <li><span class="dfn-paneled" id="term-for-propdef-font-size" style="color:initial">font-size</span>
    </ul>
   <li>
    <a data-link-type="biblio">[css-sizing-3]</a> defines the following terms:
    <ul>
     <li><span class="dfn-paneled" id="term-for-valdef-width-auto" style="color:initial">auto</span>
    </ul>
   <li>
    <a data-link-type="biblio">[css-text-3]</a> defines the following terms:
    <ul>
     <li><span class="dfn-paneled" id="term-for-valdef-white-space-nowrap" style="color:initial">nowrap</span>
     <li><span class="dfn-paneled" id="term-for-valdef-white-space-pre" style="color:initial">pre</span>
    </ul>
   <li>
    <a data-link-type="biblio">[CSS-TEXT-4]</a> defines the following terms:
    <ul>
     <li><span class="dfn-paneled" id="term-for-valdef-text-wrap-nowrap" style="color:initial">nowrap</span>
     <li><span class="dfn-paneled" id="term-for-propdef-text-wrap" style="color:initial">text-wrap</span>
     <li><span class="dfn-paneled" id="term-for-propdef-white-space" style="color:initial">white-space</span>
    </ul>
   <li>
    <a data-link-type="biblio">[CSS-VALUES-3]</a> defines the following terms:
    <ul>
     <li><span class="dfn-paneled" id="term-for-percentage-value" style="color:initial">&lt;percentage></span>
    </ul>
   <li>
    <a data-link-type="biblio">[css-values-4]</a> defines the following terms:
    <ul>
     <li><span class="dfn-paneled" id="term-for-css-wide-keywords" style="color:initial">css-wide keywords</span>
     <li><span class="dfn-paneled" id="term-for-comb-one" style="color:initial">|</span>
    </ul>
   <li>
    <a data-link-type="biblio">[CSS21]</a> defines the following terms:
    <ul>
     <li><span class="dfn-paneled" id="term-for-propdef-height" style="color:initial">height</span>
     <li><span class="dfn-paneled" id="term-for-propdef-width" style="color:initial">width</span>
    </ul>
  </ul>
  <h2 class="no-num no-ref heading settled" id="references"><span class="content">References</span><a class="self-link" href="#references"></a></h2>
  <h3 class="no-num no-ref heading settled" id="normative"><span class="content">Normative References</span><a class="self-link" href="#normative"></a></h3>
  <dl>
   <dt id="biblio-css-display-3">[CSS-DISPLAY-3]
   <dd>Tab Atkins Jr.; Elika Etemad. <a href="https://www.w3.org/TR/css-display-3/">CSS Display Module Level 3</a>. 28 August 2018. CR. URL: <a href="https://www.w3.org/TR/css-display-3/">https://www.w3.org/TR/css-display-3/</a>
   <dt id="biblio-css-fonts-3">[CSS-FONTS-3]
   <dd>John Daggett; Myles Maxfield; Chris Lilley. <a href="https://www.w3.org/TR/css-fonts-3/">CSS Fonts Module Level 3</a>. 20 September 2018. REC. URL: <a href="https://www.w3.org/TR/css-fonts-3/">https://www.w3.org/TR/css-fonts-3/</a>
   <dt id="biblio-css-sizing-3">[CSS-SIZING-3]
   <dd>Tab Atkins Jr.; Elika Etemad. <a href="https://www.w3.org/TR/css-sizing-3/">CSS Intrinsic &amp; Extrinsic Sizing Module Level 3</a>. 22 May 2019. WD. URL: <a href="https://www.w3.org/TR/css-sizing-3/">https://www.w3.org/TR/css-sizing-3/</a>
   <dt id="biblio-css-text-3">[CSS-TEXT-3]
   <dd>Elika Etemad; Koji Ishii; Florian Rivoal. <a href="https://www.w3.org/TR/css-text-3/">CSS Text Module Level 3</a>. 12 December 2018. WD. URL: <a href="https://www.w3.org/TR/css-text-3/">https://www.w3.org/TR/css-text-3/</a>
   <dt id="biblio-css-text-4">[CSS-TEXT-4]
   <dd>Elika Etemad; Koji Ishii; Alan Stearns. <a href="https://www.w3.org/TR/css-text-4/">CSS Text Module Level 4</a>. 20 September 2018. WD. URL: <a href="https://www.w3.org/TR/css-text-4/">https://www.w3.org/TR/css-text-4/</a>
   <dt id="biblio-css-values-3">[CSS-VALUES-3]
   <dd>Tab Atkins Jr.; Elika Etemad. <a href="https://www.w3.org/TR/css-values-3/">CSS Values and Units Module Level 3</a>. 31 January 2019. CR. URL: <a href="https://www.w3.org/TR/css-values-3/">https://www.w3.org/TR/css-values-3/</a>
   <dt id="biblio-css-values-4">[CSS-VALUES-4]
   <dd>Tab Atkins Jr.; Elika Etemad. <a href="https://www.w3.org/TR/css-values-4/">CSS Values and Units Module Level 4</a>. 31 January 2019. WD. URL: <a href="https://www.w3.org/TR/css-values-4/">https://www.w3.org/TR/css-values-4/</a>
   <dt id="biblio-css21">[CSS21]
   <dd>Bert Bos; et al. <a href="https://www.w3.org/TR/CSS2/">Cascading Style Sheets Level 2 Revision 1 (CSS 2.1) Specification</a>. 7 June 2011. REC. URL: <a href="https://www.w3.org/TR/CSS2/">https://www.w3.org/TR/CSS2/</a>
   <dt id="biblio-rfc2119">[RFC2119]
   <dd>S. Bradner. <a href="https://tools.ietf.org/html/rfc2119">Key words for use in RFCs to Indicate Requirement Levels</a>. March 1997. Best Current Practice. URL: <a href="https://tools.ietf.org/html/rfc2119">https://tools.ietf.org/html/rfc2119</a>
  </dl>
  <h2 class="no-num no-ref heading settled" id="property-index"><span class="content">Property Index</span><a class="self-link" href="#property-index"></a></h2>
  <div class="big-element-wrapper">
   <table class="index">
    <thead>
     <tr>
      <th scope="col">Name
      <th scope="col">Value
      <th scope="col">Initial
      <th scope="col">Applies to
      <th scope="col">Inh.
      <th scope="col">%ages
      <th scope="col">Anim­ation type
      <th scope="col">Canonical order
      <th scope="col">Com­puted value
    <tbody>
     <tr>
      <th scope="row"><a class="css" data-link-type="property" href="#propdef-text-size-adjust" id="ref-for-propdef-text-size-adjust②">text-size-adjust</a>
      <td>auto | none | &lt;percentage>
      <td>auto
      <td>all elements
      <td>yes
      <td>see below
      <td>by computed value
      <td>N/A
      <td>specfied keyword or percentage
   </table>
  </div>
  <h2 class="no-num no-ref heading settled" id="issues-index"><span class="content">Issues Index</span><a class="self-link" href="#issues-index"></a></h2>
  <div style="counter-reset:issue">
   <div class="issue"> All of the subsections of this section need significant
refinement:  additional detail, verification that the detail already
present is correct, etc.<a href="#issue-85cdb433"> ↵ </a></div>
   <div class="issue"> It’s not clear how much this section should define
precise behavior versus how much it should allow future room for
innovation and improvement.<a href="#issue-641cec1d"> ↵ </a></div>
   <div class="issue">Define
this with more detail/precision.<a href="#issue-7a854497"> ↵ </a></div>
   <div class="issue"> "Small device" is not well defined. We should clearly specify
  when text size adjustment should apply. For example, in practice a
  large tablet is considered by vendors to be a small device.<a href="#issue-a75ce4d0"> ↵ </a></div>
  </div>
  <aside class="dfn-panel" data-for="propdef-text-size-adjust">
   <b><a href="#propdef-text-size-adjust">#propdef-text-size-adjust</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-propdef-text-size-adjust">2. Default size adjustment</a>
    <li><a href="#ref-for-propdef-text-size-adjust①">3. Size adjustment control: the text-size-adjust property</a>
   </ul>
  </aside>
<script>/* script-dfn-panel */

document.body.addEventListener("click", function(e) {
    var queryAll = function(sel) { return [].slice.call(document.querySelectorAll(sel)); }
    // Find the dfn element or panel, if any, that was clicked on.
    var el = e.target;
    var target;
    var hitALink = false;
    while(el.parentElement) {
        if(el.tagName == "A") {
            // Clicking on a link in a <dfn> shouldn't summon the panel
            hitALink = true;
        }
        if(el.classList.contains("dfn-paneled")) {
            target = "dfn";
            break;
        }
        if(el.classList.contains("dfn-panel")) {
            target = "dfn-panel";
            break;
        }
        el = el.parentElement;
    }
    if(target != "dfn-panel") {
        // Turn off any currently "on" or "activated" panels.
        queryAll(".dfn-panel.on, .dfn-panel.activated").forEach(function(el){
            el.classList.remove("on");
            el.classList.remove("activated");
        });
    }
    if(target == "dfn" && !hitALink) {
        // open the panel
        var dfnPanel = document.querySelector(".dfn-panel[data-for='" + el.id + "']");
        if(dfnPanel) {
            dfnPanel.classList.add("on");
            var rect = el.getBoundingClientRect();
            dfnPanel.style.left = window.scrollX + rect.right + 5 + "px";
            dfnPanel.style.top = window.scrollY + rect.top + "px";
            var panelRect = dfnPanel.getBoundingClientRect();
            var panelWidth = panelRect.right - panelRect.left;
            if(panelRect.right > document.body.scrollWidth && (rect.left - (panelWidth + 5)) > 0) {
                // Reposition, because the panel is overflowing
                dfnPanel.style.left = window.scrollX + rect.left - (panelWidth + 5) + "px";
            }
        } else {
            console.log("Couldn't find .dfn-panel[data-for='" + el.id + "']");
        }
    } else if(target == "dfn-panel") {
        // Switch it to "activated" state, which pins it.
        el.classList.add("activated");
        el.style.left = null;
        el.style.top = null;
    }

});
</script>